﻿#ifndef HEARTBEATCODEC_H
#define HEARTBEATCODEC_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include "LogSaver.h"

class Device;
class UdpCodec;
class HeartBeatCodec : public QObject,public ObjAutoInject
{
  Q_OBJECT
private://dependency
  UdpCodec* udpCodec=Q_NULLPTR;
  LogSaver* logSaver=LogSaver::getLogSaver();
public:
  explicit HeartBeatCodec();
  virtual ~HeartBeatCodec();
signals:
public:
  void sendHeartBeat(uint deviceId, ushort msgId);
public://geter and seter
  UdpCodec* getUdpCodec()const;
  HeartBeatCodec* setUdpCodec(UdpCodec*const udpCodec);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap);
};

#endif // HEARTBEATCODEC_H
